/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author psed
 */
@Entity
@Table(name = "EXCHANGECOURSE")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ExCourse.findAll", query = "SELECT e FROM ExCourse e"),
    @NamedQuery(name = "ExCourse.findById", query = "SELECT e FROM ExCourse e WHERE e.id = :id"),
    @NamedQuery(name = "ExCourse.findByCurrency", query = "SELECT e FROM ExCourse e WHERE e.currency = :currency"),
    @NamedQuery(name = "ExCourse.findByIndollars", query = "SELECT e FROM ExCourse e WHERE e.indollars = :indollars")})
public class ExCourse implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Column(name = "ID")
    private Integer id;
    @Size(max = 3)
    @Column(name = "CURRENCY")
    private String currency;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "INDOLLARS")
    private Float indollars;

    public ExCourse() {
    }

    public ExCourse(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getCurrency() {
        return currency;
    }

    public void setCurrency(String currency) {
        this.currency = currency;
    }

    public Float getIndollars() {
        return indollars;
    }

    public void setIndollars(Float indollars) {
        this.indollars = indollars;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ExCourse)) {
            return false;
        }
        ExCourse other = (ExCourse) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ExCourse[ id=" + id + " ]";
    }
    
}
